<!DOCTYPE html>
<html lang="zh">
<head>
    <title>{block name="title"}{:admin_sysconf('app_name')}{/block}</title>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit">
    <meta name="format-detection" content="telephone=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=0.4">
    <!--{if config('app_debug')}-->
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="Cache-Control" content="no-cache, must-revalidate">
    <!--{/if}-->
    <link rel="shortcut icon" href="{:admin_sysconf('site_icon')}">
    <link rel="stylesheet" href="__ROOT__/static/plugs/awesome/fonts.css?{:date('md')}">
    <link rel="stylesheet" href="__ROOT__/static/plugs/layui/css/layui.css?{:date('md')}">
    <link rel="stylesheet" href="__ROOT__/static/admin/css/console.css?{:date('mdhis')}">
    <script src="__ROOT__/static/plugs/jquery/jquery.min.js"></script>
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    {block name="style"}{/block}
    <!--兼容thinkadmin start-->
    <script src="__ROOT__/static/plugs/layui/layui.all.js"></script>
    <script>
        window.ROOT_URL = '__ROOT__';
        window.form = layui.form;
    </script>
    <!--兼容thinkadmin end-->
    <!--<script src="__ROOT__/static/plugs/jquery/pace.min.js"></script>-->
</head>
<body class="layui-layout-body" id="LAY_app">
{block name='body'}
    <div class="layui-layout layui-layout-admin layui-layout-left-hide ">
    <!-- 顶部菜单 开始 -->
    <div class="layui-header">
        <a href="/admin.html#spm=m-53-94-96" class="layui-logo layui-elip">{:admin_sysconf('app_name')} </a>
        <ul class="layui-nav layui-layout-left" lay-filter="layadmin-system-top-menu">
            <!--侧边伸缩-->
            <!--<li class="layui-nav-item layadmin-flexible" lay-unselect>-->
                <!--<a href="javascript:;" layadmin-event="flexible" class="text-center flexible" title="侧边伸缩">-->
                    <!--<i class="layui-icon layui-icon-shrink-right" id="LAY_app_flexible"></i>-->
                <!--</a>-->
            <!--</li>-->
            {foreach $menus as $oneMenu}
            <li class="layui-nav-item">
                {notempty name='oneMenu.sub'}
                <a data-id="{$oneMenu.id}" href="#spm=m-{$oneMenu.id}">
                    {notempty name='oneMenu.icon'}<span class='{$oneMenu.icon} padding-right-5'></span>{/notempty}
                    <span>{$oneMenu.title|default=''}</span>
                </a>
                {else}
                <a  lay-href="{$oneMenu.url}">
                    {notempty name='oneMenu.icon'}<span class='{$oneMenu.icon} padding-right-5'></span>{/notempty}
                    <span>{$oneMenu.title|default=''}</span>
                </a>
                {/notempty}
            </li>
            {/foreach}
        </ul>
        <ul class="layui-nav layui-layout-right">
            {notempty name='Think.session.user'}
            <li class="layui-nav-item">
                <dl class="layui-nav-child">
                    <!--<dd lay-unselect><a data-modal="{:url('admin/index/info',['id'=>session('user.id')])}"><i class="layui-icon layui-icon-set-fill margin-right-5"></i>基本资料</a></dd>-->
                    <dd lay-unselect><a data-modal="{:url('admin/index/pass',['id'=>session('user.id')])}"><i class="layui-icon layui-icon-component margin-right-5"></i>修改密码</a></dd>
                    <!--<dd lay-unselect><a data-modal="{:url('admin/index/buildOptimize')}"><i class="layui-icon layui-icon-template-1 margin-right-5"></i>压缩发布</a></dd>-->
                    <!--<dd lay-unselect><a data-modal="{:url('admin/index/clearRuntime')}"><i class="layui-icon layui-icon-fonts-clear margin-right-5"></i>清理缓存</a></dd>-->
                    <dd lay-unselect><a data-confirm="确定要退出登录吗？" data-load="{:url('admin/login/out')}"><i class="layui-icon layui-icon-release margin-right-5"></i>退出登录</a></dd>
                </dl>
                <a><span><i class="layui-icon layui-icon-username margin-right-5"></i> {:session('user.username')}</span></a>
            </li>
            {else}
            <li class="layui-nav-item">
                <a data-href="{:url('@admin/login')}"><i class="layui-icon layui-icon-username"></i> 立即登录</a>
            </li>
            {/notempty}
        </ul>
    </div>
    <!-- 顶部菜单 结束 -->

    <!--layui-menu-->
    <div class="layui-side layui-side-menu">
        <div class="layui-side-scroll">
            <ul class="layui-nav layui-nav-tree layui-nav-tree-top">
                <li class="layui-nav-item layadmin-flexible" lay-unselect>
                    <a href="javascript:;" layadmin-event="flexible" class="text-center flexible" title="侧边伸缩">
                        <i class="layui-icon layui-icon-shrink-right" id="LAY_app_flexible"></i>
                    </a>
                </li>
            </ul>
            {foreach $menus as $oneMenu}
            {notempty name='oneMenu.sub'}
            <!--id LAY-system-side-menu-->
            <ul class="layui-nav layui-nav-tree  layui-nav-{$oneMenu.id}" lay-shrink="all" style="display: none"  lay-filter="layadmin-system-side-menu">
                {foreach $oneMenu.sub as $twoMenu}
                {empty name='twoMenu.sub'}
                <li class="layui-nav-item">
                    <a lay-tips="{$twoMenu.title}"  data-id="{$twoMenu.id}" href="#spm=m-{$oneMenu.id}-{$twoMenu.id}"  lay-href="{$twoMenu.url}">
                        <i class='{$twoMenu.icon|default="layui-icon layui-icon-link"}'></i>
                        <span class="nav-text padding-left-5">{$twoMenu.title}</span>
                    </a>
                </li>
                {else}
                <li class="layui-nav-item" >
                    <a href="javascript:;" data-id="{$twoMenu.id}" >
                        <i class='layui-icon {$twoMenu.icon|default="layui-icon layui-icon-triangle-d"}'></i>
                        <span class="nav-text padding-left-5">{$twoMenu.title}</span>
                    </a>
                    <dl class="layui-nav-child">
                        {foreach $twoMenu.sub as $thrMenu}
                        <dd>
                            <a  lay-href="{$thrMenu.url}" data-id="{$thrMenu.id}" href="#spm=m-{$oneMenu.id}-{$twoMenu.id}-{$thrMenu.id}">
                                <i class='nav-icon padding-left-5 {$thrMenu.icon|default="layui-icon layui-icon-link"}'></i>
                                <span class="nav-text padding-left-5">{$thrMenu.title}</span>
                            </a>
                        </dd>
                        {/foreach}
                    </dl>
                </li>
                {/empty}
                {/foreach}
            </ul>
            {/notempty}
            {/foreach}
        </div>
    </div>
    <!--layui-menu-->


    <!-- 页面标签 -->
    <div class="layadmin-pagetabs" id="LAY_app_tabs">
        <div class="layui-icon layadmin-tabs-control layui-icon-prev" layadmin-event="leftPage"></div>
        <div class="layui-icon layadmin-tabs-control layui-icon-next" layadmin-event="rightPage"></div>
        <div class="layui-icon layadmin-tabs-control layui-icon-down">
            <ul class="layui-nav layadmin-tabs-select" lay-filter="layadmin-pagetabs-nav">
                <li class="layui-nav-item" lay-unselect>
                    <a href="javascript:;"></a>
                    <dl class="layui-nav-child layui-anim-fadein">
                        <dd layadmin-event="closeThisTabs"><a href="javascript:;">关闭当前标签页</a></dd>
                        <dd layadmin-event="closeOtherTabs"><a href="javascript:;">关闭其它标签页</a></dd>
                        <dd layadmin-event="closeAllTabs"><a href="javascript:;">关闭全部标签页</a></dd>
                    </dl>
                </li>
            </ul>
        </div>
        <div class="layui-tab" lay-unauto lay-allowClose="true" lay-filter="layadmin-layout-tabs">
            <ul class="layui-tab-title" id="LAY_app_tabsheader">
                <!-- <li lay-id="{:url('/admin/index/main')}" lay-attr="{:url('/admin/index/main')}" class="layui-this"><i class="layui-icon layui-icon-home"></i></li> -->
                <li></li>
            </ul>
        </div>
    </div>


    <!-- 主体内容 -->
    <div class="layui-body" id="LAY_app_body">
        <div class="layadmin-tabsbody-item layui-show">
            <iframe src="/admin/index/main" frameborder="0" class="layadmin-iframe"></iframe>
        </div>
    </div>


</div>
{/block}
<script src="__ROOT__/static/plugs/require/require.js" ></script>
<script src="__ROOT__/static/admin/js/require-map.js"></script>
<!--<script src="__ROOT__/static/plugs/layui/layui.js"></script>-->
{block name='script'}{/block}
<script>
    require(['layui'], function () {
        window.layui.config({
            base: '__ROOT__/static/admin/js/core/'
        }).extend({
            top: 'admin'
        }).use('top');
    });

    top.$('body').on('click','.spop-msg',function () {
        $(this).parents('.spop').find('.spop-close').click();
    });
    /*{/if} */

    // window.location.href="/admin.html#spm=m-53";
</script>

</body>

</html>